namespace SmartSoft.Lists
{
    using SmartSoft.Controls;
    using SmartSoft.ADP;
    using System;
    using System.ComponentModel;
    using System.Drawing;

    public class FormDmNvLister : FormListLister
    {
        private IContainer components;

        public FormDmNvLister()
        {
            this.InitializeComponent();
        }

        public FormDmNvLister(FormListLister po_ParentForm) : base(po_ParentForm)
        {
            this.InitializeComponent();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            base.SuspendLayout();
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.ClientSize = new Size(0x2bd, 0x10a);
            base.LocalFieldCount = 0;
            base.LocalFieldName = "MA_NV";
            base.LocalTableName = "DMNV";
            base.Name = "FormDmNvLister";
            base.OrderFieldNames = "MA_NV";
            this.Text = "Danh mục nhân viên";
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        public override bool OnAdd()
        {
            base.LocalFormEditor = new FormDmNvEditor();
            return base.OnAdd();
        }

        public override bool OnEdit()
        {
            base.LocalFormEditor = new FormDmNvEditor();
            return base.OnEdit();
        }

        public override void OnFillData()
        {
            object[][] objArray = new object[7][];
            object[] objArray2 = new object[4];
            objArray2[0] = "Ma_Nv";
            objArray2[1] = "Mã nhân viên";
            objArray2[2] = "C";
            objArray[0] = objArray2;
            object[] objArray3 = new object[4];
            objArray3[0] = "Ten_Nv";
            objArray3[1] = "Tên nhân viên";
            objArray3[2] = "C";
            objArray[1] = objArray3;
            object[] objArray4 = new object[4];
            objArray4[0] = "Dia_Chi";
            objArray4[1] = "Địa chỉ";
            objArray4[2] = "C";
            objArray[2] = objArray4;
            object[] objArray5 = new object[4];
            objArray5[0] = "Phones";
            objArray5[1] = "Điện thoại";
            objArray5[2] = "C";
            objArray[3] = objArray5;
            object[] objArray6 = new object[4];
            objArray6[0] = "Mobiles";
            objArray6[1] = "Mobile";
            objArray6[2] = "C";
            objArray[4] = objArray6;
            object[] objArray7 = new object[4];
            objArray7[0] = "Email";
            objArray7[1] = "Email";
            objArray7[2] = "C";
            objArray[5] = objArray7;
            object[] objArray8 = new object[4];
            objArray8[0] = "Ma_Bp";
            objArray8[1] = "Bộ phận";
            objArray8[2] = "C";
            objArray[6] = objArray8;
            base.ColNames = objArray;
            base.OnFillData();
        }

        public override void OnRefresh()
        {
            base.LocalDataSet = new DmNvDataAccess().GetDataSet();
            base.OnRefresh();
        }
    }
}

